# -*- coding:UTF-8 -*-

import logging
from src.proconf.processconf import ProsConf
logging.basicConfig(filename="./log/getconfdata.log", filemode='w',
                    format='%(asctime)s : %(levelname)s : %(message)s',
                    level=logging.DEBUG)

class ConfData(ProsConf):
    def __init__(self):
        ProsConf.__init__(self)

    def get_one_value(self, section, key):
        try:
            secvalue = dict(self.get_section_dict(section))
            logging.info(secvalue)
            return secvalue[key]
        except BaseException as e :
            logging.error(e)